package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Fields generated by hbm2java
 */
@Entity
@Table(name="fields"
    ,catalog="madr_bd10"
)
public class Fields  implements java.io.Serializable {


     private Integer idFie;
     private Farms farms;
     private String nameFie;
     private double altitudeFie;
     private double latitudeFie;
     private double longitudeFie;
     private double areaFie;
     private String measureUnitFie;
     private boolean pestsControlFie;
     private boolean diseasesControlFie;
     private boolean statusFie;
     private String idProjectFie;
     private Set productionEventses = new HashSet(0);
     private Set clusterses = new HashSet(0);
     private Set worldclims = new HashSet(0);
     private Set rastases = new HashSet(0);
     private Set fieldsProducerses = new HashSet(0);

    public Fields() {
    }

	
    public Fields(String nameFie, double altitudeFie, double latitudeFie, double longitudeFie, double areaFie, String measureUnitFie, boolean pestsControlFie, boolean diseasesControlFie, boolean statusFie) {
        this.nameFie = nameFie;
        this.altitudeFie = altitudeFie;
        this.latitudeFie = latitudeFie;
        this.longitudeFie = longitudeFie;
        this.areaFie = areaFie;
        this.measureUnitFie = measureUnitFie;
        this.pestsControlFie = pestsControlFie;
        this.diseasesControlFie = diseasesControlFie;
        this.statusFie = statusFie;
    }
    public Fields(Farms farms, String nameFie, double altitudeFie, double latitudeFie, double longitudeFie, double areaFie, String measureUnitFie, boolean pestsControlFie, boolean diseasesControlFie, boolean statusFie, String idProjectFie, Set productionEventses, Set clusterses, Set worldclims, Set rastases, Set fieldsProducerses) {
       this.farms = farms;
       this.nameFie = nameFie;
       this.altitudeFie = altitudeFie;
       this.latitudeFie = latitudeFie;
       this.longitudeFie = longitudeFie;
       this.areaFie = areaFie;
       this.measureUnitFie = measureUnitFie;
       this.pestsControlFie = pestsControlFie;
       this.diseasesControlFie = diseasesControlFie;
       this.statusFie = statusFie;
       this.idProjectFie = idProjectFie;
       this.productionEventses = productionEventses;
       this.clusterses = clusterses;
       this.worldclims = worldclims;
       this.rastases = rastases;
       this.fieldsProducerses = fieldsProducerses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_fie", unique=true, nullable=false)
    public Integer getIdFie() {
        return this.idFie;
    }
    
    public void setIdFie(Integer idFie) {
        this.idFie = idFie;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_farm_fie")
    public Farms getFarms() {
        return this.farms;
    }
    
    public void setFarms(Farms farms) {
        this.farms = farms;
    }
    
    @Column(name="name_fie", nullable=false, length=45)
    public String getNameFie() {
        return this.nameFie;
    }
    
    public void setNameFie(String nameFie) {
        this.nameFie = nameFie;
    }
    
    @Column(name="altitude_fie", nullable=false, precision=22, scale=0)
    public double getAltitudeFie() {
        return this.altitudeFie;
    }
    
    public void setAltitudeFie(double altitudeFie) {
        this.altitudeFie = altitudeFie;
    }
    
    @Column(name="latitude_fie", nullable=false, precision=22, scale=0)
    public double getLatitudeFie() {
        return this.latitudeFie;
    }
    
    public void setLatitudeFie(double latitudeFie) {
        this.latitudeFie = latitudeFie;
    }
    
    @Column(name="longitude_fie", nullable=false, precision=22, scale=0)
    public double getLongitudeFie() {
        return this.longitudeFie;
    }
    
    public void setLongitudeFie(double longitudeFie) {
        this.longitudeFie = longitudeFie;
    }
    
    @Column(name="area_fie", nullable=false, precision=22, scale=0)
    public double getAreaFie() {
        return this.areaFie;
    }
    
    public void setAreaFie(double areaFie) {
        this.areaFie = areaFie;
    }
    
    @Column(name="measure_unit_fie", nullable=false, length=10)
    public String getMeasureUnitFie() {
        return this.measureUnitFie;
    }
    
    public void setMeasureUnitFie(String measureUnitFie) {
        this.measureUnitFie = measureUnitFie;
    }
    
    @Column(name="pests_control_fie", nullable=false)
    public boolean isPestsControlFie() {
        return this.pestsControlFie;
    }
    
    public void setPestsControlFie(boolean pestsControlFie) {
        this.pestsControlFie = pestsControlFie;
    }
    
    @Column(name="diseases_control_fie", nullable=false)
    public boolean isDiseasesControlFie() {
        return this.diseasesControlFie;
    }
    
    public void setDiseasesControlFie(boolean diseasesControlFie) {
        this.diseasesControlFie = diseasesControlFie;
    }
    
    @Column(name="status_fie", nullable=false)
    public boolean isStatusFie() {
        return this.statusFie;
    }
    
    public void setStatusFie(boolean statusFie) {
        this.statusFie = statusFie;
    }
    
    @Column(name="id_project_fie", length=4)
    public String getIdProjectFie() {
        return this.idProjectFie;
    }
    
    public void setIdProjectFie(String idProjectFie) {
        this.idProjectFie = idProjectFie;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="fields")
    public Set getProductionEventses() {
        return this.productionEventses;
    }
    
    public void setProductionEventses(Set productionEventses) {
        this.productionEventses = productionEventses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="fields")
    public Set getClusterses() {
        return this.clusterses;
    }
    
    public void setClusterses(Set clusterses) {
        this.clusterses = clusterses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="fields")
    public Set getWorldclims() {
        return this.worldclims;
    }
    
    public void setWorldclims(Set worldclims) {
        this.worldclims = worldclims;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="fields")
    public Set getRastases() {
        return this.rastases;
    }
    
    public void setRastases(Set rastases) {
        this.rastases = rastases;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="fields")
    public Set getFieldsProducerses() {
        return this.fieldsProducerses;
    }
    
    public void setFieldsProducerses(Set fieldsProducerses) {
        this.fieldsProducerses = fieldsProducerses;
    }




}


